import request from '@/util/request';

//分页查询食物列表
export const foodListByPageService = (foodData) => {
    return request.get("/food/foodListByPage", { params: { ...foodData } });
}

//修改食物信息
export const editFoodService = (foodData) => {
    return request.put("/food/editFood", foodData)
}

//通过id获取食物对象
export const getFoodByIdService = (id) => {
    return request.get("/food/getFoodById?id=" + id)
}

//通过id删除食物信息
export const deleteFoodByIdService = (id) => {
    return request.delete("/food/deleteFoodById?id=" + id)
}

//新增食物
export const addFoodService = (foodData) => {
    return request.post("/food/addFood", foodData)
}